﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

namespace OnlineFloralShop
{
    public class Global : System.Web.HttpApplication
    {
       
        

        protected void Application_Start(object sender, EventArgs e)
        {

        }

        protected void Session_Start(object sender, EventArgs e)
        {
            //Declare a Dictionary variable to store cart
            Dictionary<string, int> cart = new Dictionary<string, int>();
            //set session cart
            Session["cart"] = cart;
            Session["username"] = null;
            Session["AddToCartReferrer"] = null;

            //session store shipping information
            Dictionary<string, string> shipping = new Dictionary<string, string>();
            Session["Shipping"] = shipping;

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {
            Session["cart"] = null;
        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}